SHIM: A Deterministic Approach to Programming with Threads
نویسندگان
چکیده
Concurrent programming languages should be a good fit for embedded systems because they match the intrinsic parallelism of their architectures and environments. Unfortunately, most concurrent programming formalisms are prone to races and nondeterminism, despite the presence of mechanisms such as monitors. In this paper, we propose SHIM, the core of a concurrent language with disciplined shared variables that remains deterministic, meaning the behavior of a program is independent of the scheduling of concurrent operations. SHIM does not sacrifice power or flexibility to achieve this determinism. It supports both synchronous and asynchronous paradigms—loosely and tightly synchronized threads—the dynamic creation of threads and shared variables, recursive procedures, and exceptions. We illustrate our programming model with examples including breadth-first-search algorithms and pipelines. By construction, they are race-free. We provide the formal semantics of SHIM and a preliminary implementation.
منابع مشابه
Multi-choice stochastic bi-level programming problem in cooperative nature via fuzzy programming approach
In this paper, a Multi-Choice Stochastic Bi-Level Programming Problem (MCSBLPP) is considered where all the parameters of constraints are followed by normal distribution. The cost coefficients of the objective functions are multi-choice types. At first, all the probabilistic constraints are transformed into deterministic constraints using stochastic programming approach. Further, a general tran...
متن کاملA Single Machine Capacitated Production Planning Problem Under Uncertainty: A Grey Linear Programming Approach
The production planning is an important problem in most of manufacturing systems in practice. Unlike many researches existing in literature, this problem encounters with great uncertainties in parameters and input data. In this paper, a single machine capacitated production planning problem is considered and a linear programming formulation is presented. The production costs are assumed to be u...
متن کاملFractional CCP: A Fuzzy Goal Programming Approach
Abstract It is the purpose of this article to introduce a linear approximation technique for solving a fractional chance constrained programming (CC) problem. For this purpose, a fuzzy goal programming model of the equivalent deterministic form of the fractional chance constrained programming is provided and then the process of defuzzification and linearization of the problem is started. A sam...
متن کاملA robust multi-objective global supplier selection model under currency fluctuation and price discount
Robust supplier selection problem, in a scenario-based approach has been proposed, when the demand and exchange rates are subject to uncertainties. First, a deterministic multi-objective mixed integer linear programming is developed; then, the robust counterpart of the proposed mixed integer linear programming is presented using the recent extension in robust optimization theory. We discuss dec...
متن کاملA ROBUST OPTIMIZATION MODEL FOR BLOOD SUPPLY CHAIN NETWORK DESIGN
The eternal need for humans' blood as a critical commodity makes the healthcare systems attempt to provide efficient blood supply chains (BSCs) by which the requirements are satisfied at the maximum level. To have an efficient supply of blood, an appropriate planning for blood supply chain is a challenge which requires more attention. In this paper, we address a mixed integer linear programming...
متن کامل